import React from 'react';
import {View, StyleSheet, ScrollView, RefreshControl} from 'react-native';
import Colors from '../utils/Colors';
import CategroyTop from '../component/categroy/CategroyTop';
import Cate from '../component/categroy/Cate';
const styles = StyleSheet.create({
  activityView: {
    flex: 1,
    position: 'relative',
    width: '100%',
    backgroundColor: Colors.patBGGray,
    display: 'flex',
    justifyContent: 'center',
    alignItems: 'center',
    flexDirection: 'column',
  },
  h: {
    flex: 1,
    width: '100%',
    backgroundColor: '#f30',
  },
});
const Search = () => {
  const [h, setH] = React.useState(500);

  const onLayout = React.useCallback(e => {
    setH(e.nativeEvent.layout.height);
  }, []);
  return (
    <View style={styles.activityView}>
      <CategroyTop />
      <View style={styles.h} onLayout={onLayout}>
        <Cate height={h} />
      </View>
    </View>
  );
};

export default Search;
